import * as React from "../../script/frame/apiModel/gui/React";
import {UnitModel} from "../../script/frame/apiModel/adapterModel/model3/UnitModel";
import {DifficultMode, ItemData, UnitAttribute, UnitShopType} from "../../script/frame/dataSource/DataModel";
import {BuffInfo, CombinationUIInfo, MultiBoradRow} from "../../script/type/Type";
import {UnitJson} from "../../script/frame/apiModel/model/StoreJson";
import {ResourceKey} from "../../script/constant/ResourceConstant";
import {ItemModel} from "../../script/frame/apiModel/adapterModel/model3/ItemModel";
import { PlayerModel } from "../../script/frame/apiModel/adapterModel/model4/PlayerModel";

export abstract class GoodsBarInterface<T, J> extends React.Element<T, J> {
    reflushGoodsBar: () => void;

}

export abstract class EquipBarInterface<T, J> extends React.Element<T, J> {
    reflushEquipBar: (player: PlayerModel) => void;
}

export abstract class ButtonEnterInterface<T, J> extends React.Element<T, J> {}

export abstract class TextGuiBarInterface<T, J> extends React.Element<T, J> {
    getIndexByUiName: (uiName: number) => number
    showTextGui: (visible: boolean, index: number, uiName: string, path: string, size: { h: number, w: number }, pos: { x: number, y: number }, autoClose: boolean) => void
}

export abstract class ToastWheelBarInterface<T, J> extends React.Element<T, J> {
    // addToastTask: (path: any) => void
    openBar: () => void
}

export abstract class ChatBarInterface<T, J> extends React.Element<T, J> {
    openBar: () => void
}

export abstract class TaskButtonInterface<T, J> extends React.Element<T, J> {
    reflushTask: () => void
}

export abstract class ChooseHeroBarInterface<T, J> extends React.Element<T, J> {
    showHeroBar: (unitPoolDatas: any, autoShowAllHero: boolean, visible: boolean) => void
    closeChooseHero: () => void;
}

export abstract class ThreeChooseOneGoodRootInterface<T, J> extends React.Element<T, J> {
    addChooseTask : (id: string, ownerId: string) => void
    toNextTask: () => void;
}

export abstract class DamageButtonInterface<T, J> extends React.Element<T, J> {
    reflushHurt: () => void;
}

export abstract class CombinationBarInterface<T, J> extends React.Element<T, J> {
    reflushCombinationInfo: () => void;
}

export abstract class PetBarInterface<T, J> extends React.Element<T, J> {
    showPetBar: () => void;
    closePetBar: () => void;
}

export abstract class ResumeBarInterface<T, J> extends React.Element<T, J> {
    showResumeBar: (cost: number) => void;
    canel: () => void;
}

export abstract class BossLifeBarInterface<T, J> extends React.Element<T, J> {
    reflushBar: (life: number, maxLife: number) => void;
    canel: () => void;
}

export abstract class ChooseDiffBarInterface<T, J> extends React.Element<T, J> {
    openBar: (currentDiff: number) => void;
    reflush: (mode: DifficultMode, difficult: number) => void;
    closeBar: () => void;
}

export abstract class ChooseArchiveBarInterface<T, J> extends React.Element<T, J> {
    openBar: (unitJsons: UnitJson[]) => void;
    // reflush: (mode: DifficultMode, difficult: number) => void;
    closeBar: () => void;
}


export abstract class AchBarInterface<T, J> extends React.Element<T, J> {
    closeBar: () => void;
    openBar: () => void;
}

export abstract class HideAchievementBarInterface<T, J> extends React.Element<T, J> {
    closeBar: () => void;
    openBar: () => void;
}

export abstract class TalentBarInterface<T, J> extends React.Element<T, J> {
    closeBar: () => void;
    openBar: () => void;
}

export abstract class AttrBarInterface<T, J> extends React.Element<T, J> {
    closeBar: () => void;
    openBar: () => void;
}

export abstract class HandBookBarInterface<T, J> extends React.Element<T, J> {
    closeBar: () => void;
    openBar: () => void;
}

export abstract class AppearanceBarInterface<T, J> extends React.Element<T, J> {
    closeBar: () => void;
    openBar: () => void;
}

export abstract class IntegralMallBarInterface<T, J> extends React.Element<T, J> {
    closeBar: () => void;
    openBar: () => void;
}

export abstract class BuffBarInterface<T, J> extends React.Element<T, J> {
    resetBuffs: () => void;
    closeBar: () => void;
}

export abstract class AdminBarInterface<T, J> extends React.Element<T, J> {
    closeBar: () => void;
    openBar: () => void;
}

export abstract class MultiBoradBarInterface<T, J> extends React.Element<T, J> {
    openBar: () => void;
}

export abstract class SmallAttrBarInterface<T, J> extends React.Element<T, J> {
    openBar: () => void;
}

export abstract class AvatarBarInterface<T, J> extends React.Element<T, J> {
    openBar: () => void;
}

export abstract class SkillBarInterface<T, J> extends React.Element<T, J> {
    openBar: () => void;
}
export abstract class ItemBarInterface<T, J> extends React.Element<T, J> {
    openBar: () => void;
}

export abstract class TopBarInterface<T, J> extends React.Element<T, J> {
    openBar: () => void;
}

export abstract class UnitShopInterface<T, J> extends React.Element<T, J> {
    openBar: () => void;
}





// ------------------ 以上为自动生成的代码 ------------------

export interface BuffBarInfo {
    unit: UnitModel;
    buffs: BuffInfo[],
    attr: UnitAttribute;
}

export interface AvatarInfo {
    maxLife: number;
    life: number;
    maxMana: number;
    mana: number;
    lv: number;
    icon: string
    exp: number;
    name: string;
    resumeTime: number;
    maxResumeTime: number;
}

export interface TopBarInfo {
    coin: number,
    wood: number,
    killNum: number,
    wave: number,
    waveTime: number,
    maxMonsterNum: number,
    monsterNum: number,
    diffNum: number
}

export interface TargetItemInfo {
    id: string;
    handleId: string;
    x: number;
    y: number;
}

export interface ChatInfo {
    chats: string[]
    chatsIndex: number
}

export interface PetInfo {
    id: string,
    exp: number,
    lv: number,
    resumeTime: number,
    attr: UnitAttribute,
    bVaild: boolean,
    bAlive: boolean,
    bBattle: boolean,
}

export interface ItemInfo {
    strId: string,
    num: number,
    lv: number,
    affixs: string,
}
export interface EquipInfo {
    items: ItemInfo[],
    lv: number,
    isOwner: boolean,
}

export interface BagInfo {
    bags: ItemInfo[],
    equips: ItemInfo[],
    lv: number,
}
